<html>
<head><meta charset="utf-8"><title>stack growing · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html">stack growing</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="137058912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/137058912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#137058912">(Nov 02 2018 at 15:51)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@Oli</span> btw I have thought of a way to have virtually unlimited stacks in a fairly portable manner that also properly supports stack guards.</p>



<a name="137059022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/137059022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#137059022">(Nov 02 2018 at 15:51)</a>:</h4>
<p>on any plaform that has a virtual/physical memory distinction, which is, I believe, everything we care about</p>



<a name="137059321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/137059321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#137059321">(Nov 02 2018 at 15:52)</a>:</h4>
<p>Basically <code>mmap</code> without commiting a huge area of address space and then commit pages explicitly on specifically annotated points.</p>



<a name="137059346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/137059346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#137059346">(Nov 02 2018 at 15:52)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="116015">@Alex Crichton</span></p>



<a name="137059548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/137059548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#137059548">(Nov 02 2018 at 15:53)</a>:</h4>
<p>If windows did overcommit like posixes, then the explicit points of commit would not be necessary even</p>



<a name="137060420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/137060420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#137060420">(Nov 02 2018 at 15:57)</a>:</h4>
<p>I was planning to develop a crate around that concept as soon as I was done with <code>optimize</code> attribute PR, but I got stuck with testing <code>optimize</code> and now I have a headache too <span class="emoji emoji-1f641" title="frown">:frown:</span></p>



<a name="137068294"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/137068294" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#137068294">(Nov 02 2018 at 17:10)</a>:</h4>
<p>I have partially understood what you are saying, but the last time I came in contact with mmap and paging was in uni. I can start reading up on it, but it'll take me a while to get up to speed. If you have it in the cache, I'd rather wait for your concept crate and see how to integrate that. Now that we have an entry point in librustc, we can replace the implementation at any time</p>



<a name="137068486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/137068486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#137068486">(Nov 02 2018 at 17:14)</a>:</h4>
<p>Indeed. I want to make a prototype myself anyway.</p>



<a name="137073109"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/137073109" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#137073109">(Nov 02 2018 at 18:25)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> that still requires -- iiuc -- some sort of "maximum size", right?</p>



<a name="137073140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/137073140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#137073140">(Nov 02 2018 at 18:25)</a>:</h4>
<p>I remember, at a company I worked at, somebody added a buffer that would reallocate automatically on overflow by intercepting the segv handler</p>



<a name="137073195"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/137073195" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#137073195">(Nov 02 2018 at 18:26)</a>:</h4>
<p>this worked great until we ran into problems where we had to relocate the base address</p>



<a name="137073204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/137073204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#137073204">(Nov 02 2018 at 18:26)</a>:</h4>
<blockquote>
<p>I remember, at a company I worked at, somebody added a buffer that would reallocate automatically on overflow by intercepting the segv handler</p>
</blockquote>
<p>that is, it would allocate the page once you overflowed</p>



<a name="137073209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/137073209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#137073209">(Nov 02 2018 at 18:26)</a>:</h4>
<p>(by putting a guard page at the end)</p>



<a name="137073222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/137073222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#137073222">(Nov 02 2018 at 18:26)</a>:</h4>
<p>these days, overcommit will kind of do it for you...</p>



<a name="137073245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/137073245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#137073245">(Nov 02 2018 at 18:27)</a>:</h4>
<p>anyway maybe I didn't really understand what you are saying</p>



<a name="137092840"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/137092840" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#137092840">(Nov 03 2018 at 00:53)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> </p>
<blockquote>
<p>Basically <code>mmap</code> without commiting a huge area of address space and then commit pages explicitly on specifically annotated points.</p>
</blockquote>
<p>What do you mean by committing, do you mean write something on the page so that system is bound to allocate you the memory as linux will lazily allocate memory ?</p>



<a name="137100129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/137100129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#137100129">(Nov 03 2018 at 05:06)</a>:</h4>
<p>Yes, that would still require a maximum size of some sort… And, indeed, since we must support 32-bit systems, we’d have to be careful about virtual address space exhaustion… hmm.</p>



<a name="137100228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/137100228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#137100228">(Nov 03 2018 at 05:09)</a>:</h4>
<p><span class="user-mention" data-user-id="128294">@blitzerr</span> Windows does not support overcommit, so it is necessary to "reserve" the virtual memory and "commit" it in two separate calls of <code>VirtualAllocEx</code>. "commit" here refers to reserving actual physical space in RAM and the page file.</p>



<a name="137100277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/137100277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#137100277">(Nov 03 2018 at 05:11)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I did not intend to require use of a sigv signal handler (but I would not prohibit it, as long as <code>mmap</code> is signal safe) and I specifically want to avoid reallocation by making users to allocate all of the necessary virtual address space up-front.</p>



<a name="137100320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/137100320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#137100320">(Nov 03 2018 at 05:12)</a>:</h4>
<p>At first I wasn’t thinking of 32-bit systems, and figured that something like 128GB of stack limit ought to be enough to everyone <span class="emoji emoji-1f642" title="slight smile">:slight_smile:</span></p>



<a name="147307417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147307417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147307417">(Nov 08 2018 at 15:39)</a>:</h4>
<p>I believe <span class="user-mention" data-user-id="123586">@nagisa</span> that the 'main thread' linux stack already operates in this way, right? -- though the compiler runs on a thread, of course.</p>



<a name="147307639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147307639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147307639">(Nov 08 2018 at 15:42)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> that’s right.</p>



<a name="147307677"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147307677" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147307677">(Nov 08 2018 at 15:42)</a>:</h4>
<p>Seems like a good solution for 64 bit processes (I want to do something like that for serialization buffers too some time)</p>



<a name="147307711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147307711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147307711">(Nov 08 2018 at 15:43)</a>:</h4>
<p>It might be sensible to implement some sort of hybrid between what stacker does and what I’m suggesting, so that we would not use too much of virtual memory on 32-bit while also virtually never hitting the turns-out-pretty-expensive stacker code paths on 64-bit targets.</p>



<a name="147307787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147307787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147307787">(Nov 08 2018 at 15:44)</a>:</h4>
<p>we could also just make 32 bit rustc just use stacker?</p>



<a name="147307823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147307823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147307823">(Nov 08 2018 at 15:45)</a>:</h4>
<p>Sure, but implementing a common API would still be desirable.</p>



<a name="147307837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147307837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147307837">(Nov 08 2018 at 15:45)</a>:</h4>
<p>but yeah, if there's a good hybrid solution, that would be even better</p>



<a name="147309336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147309336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147309336">(Nov 08 2018 at 16:04)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> well, one difference that comes to mind is that "growing" the stack would still be manual</p>



<a name="147309340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147309340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147309340">(Nov 08 2018 at 16:04)</a>:</h4>
<p>from the API standpoint</p>



<a name="147309345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147309345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147309345">(Nov 08 2018 at 16:05)</a>:</h4>
<p>even if on Linux that is not necessary it may be necessary on the other targets.</p>



<a name="147309359"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147309359" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147309359">(Nov 08 2018 at 16:05)</a>:</h4>
<p>(such as Windows)</p>



<a name="147309375"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147309375" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147309375">(Nov 08 2018 at 16:05)</a>:</h4>
<p>And that conveniently also allows easily integrating hybrid approaches as well.</p>



<a name="147310199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147310199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147310199">(Nov 08 2018 at 16:16)</a>:</h4>
<p>ah <span class="user-mention" data-user-id="123586">@nagisa</span> so the idea would be that we "reserve" space for things to grow "in place" but not actually <em>allocate</em> that space until later? (essentially doing "overcommitment" of a sort?)</p>



<a name="147315452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147315452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147315452">(Nov 08 2018 at 17:33)</a>:</h4>
<blockquote>
<p>the turns-out-pretty-expensive stacker code paths</p>
</blockquote>



<a name="147315458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147315458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147315458">(Nov 08 2018 at 17:33)</a>:</h4>
<p>I'm working on figuring this out</p>



<a name="147315523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147315523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147315523">(Nov 08 2018 at 17:34)</a>:</h4>
<p>it might not be as bad as projected in the perf run, as that was using the most naive algorithm available</p>



<a name="147364917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147364917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147364917">(Nov 09 2018 at 11:10)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> yes, my plan was to allocate a dozen gigs of virtual memory on 64-bit systems and only back it with physical pages on demand.</p>



<a name="147364926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147364926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147364926">(Nov 09 2018 at 11:11)</a>:</h4>
<p>making the stack… ahem, virtually unlimited</p>



<a name="147364934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147364934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147364934">(Nov 09 2018 at 11:11)</a>:</h4>
<p>doesn’t work on 32-bit of course, as there ain’t that much virtual memory there</p>



<a name="147443791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147443791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147443791">(Nov 10 2018 at 18:49)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@Oli</span> the first thing I’m doing right now is making a cross-platform stack manipulation library that could replace the stacker’s <code>arch</code> module</p>



<a name="147443796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147443796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147443796">(Nov 10 2018 at 18:49)</a>:</h4>
<p>this should end up unblocking at least the "only x86" part of the problem that stacker has.</p>



<a name="147443856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147443856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147443856">(Nov 10 2018 at 18:51)</a>:</h4>
<p>I had hoped to circumvent this issue altoghether by not needing to switch stacks at all, ever, but that is unfeasible (1) on 32-bit targets as discussed above; and (2) there’s nothing that can avoid switching stacks while also integrating nicely with the std’s thread and everything that is built on it.</p>



<a name="147443912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147443912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147443912">(Nov 10 2018 at 18:53)</a>:</h4>
<p>(2) is because you cannot simply provide your own stack buffer when creating a thread.</p>



<a name="147470579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147470579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147470579">(Nov 11 2018 at 09:27)</a>:</h4>
<p>Is 2 fixable by changing the internal thread API?</p>



<a name="147471018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147471018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147471018">(Nov 11 2018 at 09:43)</a>:</h4>
<p>Maybe? we use rayon though, which has another layer of API over the std's Thread.</p>



<a name="147540820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147540820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147540820">(Nov 12 2018 at 17:55)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@Oli</span> which is the PR that uses stacker?</p>



<a name="147540895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147540895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147540895">(Nov 12 2018 at 17:56)</a>:</h4>
<blockquote>
<p>Maybe? we use rayon though, which has another layer of API over the std's Thread.</p>
</blockquote>
<p>we need to revisit this</p>



<a name="147576839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147576839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147576839">(Nov 13 2018 at 08:17)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/55617" target="_blank" title="https://github.com/rust-lang/rust/pull/55617">https://github.com/rust-lang/rust/pull/55617</a> is the PR, but I need to update it to use the less-stack-thrashing PR I made to stacker and rerun perf</p>



<a name="147789722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147789722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147789722">(Nov 16 2018 at 02:11)</a>:</h4>
<p>Where can I learn more about the <em>why</em> behind all this?</p>



<a name="147804042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147804042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147804042">(Nov 16 2018 at 08:42)</a>:</h4>
<p>What kind of <em>why</em> are you interested in? I made a list of issues in the PR that are fixed by it. Or are you wondering how those issues came to be?</p>



<a name="147820010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/147820010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#147820010">(Nov 16 2018 at 14:31)</a>:</h4>
<blockquote>
<p>I made a list of issues in the PR that are fixed by it. </p>
</blockquote>
<p>That's a good start for me, thank you</p>



<a name="150929265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/150929265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#150929265">(Dec 05 2018 at 13:55)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@Oli</span> so you know why your fix didn’t help?</p>



<a name="150929274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/150929274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#150929274">(Dec 05 2018 at 13:55)</a>:</h4>
<p>nope</p>



<a name="150929287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/150929287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#150929287">(Dec 05 2018 at 13:55)</a>:</h4>
<p>because the stack that is overflowing for mach is… <em>intense drumming</em></p>



<a name="150929301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/150929301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#150929301">(Dec 05 2018 at 13:55)</a>:</h4>
<p>for the main thread! <em>ba dum tsh</em></p>



<a name="150929356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/150929356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#150929356">(Dec 05 2018 at 13:56)</a>:</h4>
<p>huh</p>



<a name="150929362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/150929362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#150929362">(Dec 05 2018 at 13:56)</a>:</h4>
<p>and that is obviously not affected by the stack size stuff, because that only affects the threads, not main stack</p>



<a name="150929391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/150929391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#150929391">(Dec 05 2018 at 13:56)</a>:</h4>
<p>if it was a proper rustc thread the error message would say <code>thread 'rustc' overflowed stack</code> or something not <code>thread 'main' overflowed stack</code>.</p>



<a name="150929465"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/150929465" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#150929465">(Dec 05 2018 at 13:57)</a>:</h4>
<p>This is related to <a href="https://github.com/rust-lang/rust/pull/48575" target="_blank" title="https://github.com/rust-lang/rust/pull/48575">https://github.com/rust-lang/rust/pull/48575</a></p>



<a name="150929707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/150929707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#150929707">(Dec 05 2018 at 14:00)</a>:</h4>
<p>I even saw that PR after it got merged... I guess it's revert time (+adding a flag)</p>



<a name="150929752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/150929752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#150929752">(Dec 05 2018 at 14:01)</a>:</h4>
<p>ugh, and we backported the increase to 1.31.0</p>



<a name="150930608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/150930608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#150930608">(Dec 05 2018 at 14:12)</a>:</h4>
<p><span class="user-mention" data-user-id="121055">@Pietro Albini</span> it is not harmful in most ways though</p>



<a name="150930621"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/150930621" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#150930621">(Dec 05 2018 at 14:13)</a>:</h4>
<p>sure</p>



<a name="150930622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/150930622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#150930622">(Dec 05 2018 at 14:13)</a>:</h4>
<p>other than just being an observable increase in memory usage</p>



<a name="151196014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/151196014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#151196014">(Dec 08 2018 at 21:38)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@Oli</span> omg I dread having to deal with delay slots for mips in its implementation of stack manipulation :D</p>



<a name="151196028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/151196028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#151196028">(Dec 08 2018 at 21:39)</a>:</h4>
<p>(good news are is that I have all ARMs and x86(_64) covered)</p>



<a name="151196030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/151196030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#151196030">(Dec 08 2018 at 21:39)</a>:</h4>
<p>(I believe, anyway)</p>



<a name="151196101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/151196101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#151196101">(Dec 08 2018 at 21:41)</a>:</h4>
<p>(MIPS also has like 20 different ABIs...)</p>



<a name="151196151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/151196151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#151196151">(Dec 08 2018 at 21:42)</a>:</h4>
<p>/me goes to re-learn how powerpc assembly works</p>



<a name="154666649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154666649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154666649">(Jan 08 2019 at 18:47)</a>:</h4>
<p>FWIW I made a PR against stacker that implements support for all the platforms I could muster so far and some interesting questions regarding the maintainership of the crate arose</p>



<a name="154666764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154666764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154666764">(Jan 08 2019 at 18:49)</a>:</h4>
<p>See <a href="https://github.com/alexcrichton/stacker/pull/13" target="_blank" title="https://github.com/alexcrichton/stacker/pull/13">https://github.com/alexcrichton/stacker/pull/13</a> for the discussion</p>



<a name="154666796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154666796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154666796">(Jan 08 2019 at 18:49)</a>:</h4>
<p>but in summary, if it seems that rustc will become the primary user of the crate… then perhaps it should be maintained by T-compiler?</p>



<a name="154666861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154666861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154666861">(Jan 08 2019 at 18:50)</a>:</h4>
<p>however we do not per-se have a nice place to put crates like these anywhere, other than in the compiler’s own tree</p>



<a name="154666874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154666874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154666874">(Jan 08 2019 at 18:50)</a>:</h4>
<p>which I would rather not do.</p>



<a name="154666914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154666914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154666914">(Jan 08 2019 at 18:50)</a>:</h4>
<p>Also <span class="user-mention" data-user-id="124288">@Oli</span> I’d love to see your comment on the matter (both the maintainership &amp; the idea of psm itself)</p>



<a name="154667232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154667232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154667232">(Jan 08 2019 at 18:54)</a>:</h4>
<p>Perhaps the ideal solution in my eyes currently is to have a repository in a nursery or a similar group that would contain the crates we end up developing to manipulate the stack as directories</p>



<a name="154667237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154667237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154667237">(Jan 08 2019 at 18:54)</a>:</h4>
<p>with everyone on T-compiler as maintainer of it.</p>



<a name="154667597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154667597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154667597">(Jan 08 2019 at 18:59)</a>:</h4>
<p>i'm really curious what this "infinite stack" idea you have is</p>



<a name="154667704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154667704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154667704">(Jan 08 2019 at 19:00)</a>:</h4>
<p>but i guess that's unrelated to the maintainership question you're asking ;)</p>



<a name="154667781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154667781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154667781">(Jan 08 2019 at 19:01)</a>:</h4>
<p>On that note, it seems like it would be a worthwhile thing to pull into the nursery at least</p>



<a name="154668062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154668062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154668062">(Jan 08 2019 at 19:04)</a>:</h4>
<blockquote>
<p>i'm really curious what this "infinite stack" idea you have is</p>
</blockquote>
<p>My plan is to abuse virtual memory and allocate enough virtual memory to be virtually (ahem…) infinite for anybody involved…</p>



<a name="154668075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154668075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154668075">(Jan 08 2019 at 19:04)</a>:</h4>
<p>of course there are considerations and issues to solve on 32-bit, but the idea is very sound for 64-bit systems.</p>



<a name="154668139"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154668139" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154668139">(Jan 08 2019 at 19:05)</a>:</h4>
<p>That should get rid of almost any overhead that the original stacker aproach might have.</p>



<a name="154668926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154668926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154668926">(Jan 08 2019 at 19:16)</a>:</h4>
<p>hmm</p>



<a name="154668929"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154668929" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154668929">(Jan 08 2019 at 19:16)</a>:</h4>
<p>I'm a bit skeptical</p>



<a name="154668935"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154668935" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154668935">(Jan 08 2019 at 19:16)</a>:</h4>
<p>but maybe I'm missing info</p>



<a name="154668957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154668957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154668957">(Jan 08 2019 at 19:17)</a>:</h4>
<p>so on modern 64-bit hardware the actual address space is usually still limited to 48 bits or so, right?</p>



<a name="154669055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154669055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154669055">(Jan 08 2019 at 19:18)</a>:</h4>
<p>which is something like 280 terabytes</p>



<a name="154669064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154669064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154669064">(Jan 08 2019 at 19:18)</a>:</h4>
<p>if each thread grabs a terabyte stack</p>



<a name="154669071"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154669071" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154669071">(Jan 08 2019 at 19:18)</a>:</h4>
<p>you're not that far off from running out</p>



<a name="154669086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154669086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154669086">(Jan 08 2019 at 19:18)</a>:</h4>
<p>Recently it has been bumped to 57 on x86_64, and other architectures may or may not have their own limits as well</p>



<a name="154669129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154669129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154669129">(Jan 08 2019 at 19:19)</a>:</h4>
<p>I don’t see a reason to leave the user of such solution out of the decision on what size to use, and also a combination of multiple approaches may be used too.</p>



<a name="154669241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154669241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154669241">(Jan 08 2019 at 19:20)</a>:</h4>
<p>For a 100MB-sized stack that <em>might</em> in some very rare cases get stacker-switched to another 100MB-sized virtual memory region still amortizes the costs of stack switching greatly</p>



<a name="154669255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154669255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154669255">(Jan 08 2019 at 19:21)</a>:</h4>
<p>oh, cool-- i'd be curious how many of the platforms we build rustc for have 57-bit</p>



<a name="154669291"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154669291" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154669291">(Jan 08 2019 at 19:21)</a>:</h4>
<p>but yeah, the idea of grabbing 100MB chunks for a known program like rustc where you can specifically limit the number of per-process threads seems pretty sound</p>



<a name="154669387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154669387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154669387">(Jan 08 2019 at 19:22)</a>:</h4>
<p>The most important tidbit here is that it ought to grab virtual memory, commiting actual pages on access.</p>



<a name="154669410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154669410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154669410">(Jan 08 2019 at 19:23)</a>:</h4>
<p>which would not impact the resident-set for your usual-case.</p>



<a name="154669458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154669458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154669458">(Jan 08 2019 at 19:23)</a>:</h4>
<p>I’m still hazy on how to make that work on Windows as well… but I’ll figure something out</p>



<a name="154670034"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154670034" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154670034">(Jan 08 2019 at 19:30)</a>:</h4>
<p>You only need to allocate enough virtual address space to exhaust physical memory, so you don't need terabyte stacks unless you also have a terabyte of RAM</p>



<a name="154670192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154670192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154670192">(Jan 08 2019 at 19:33)</a>:</h4>
<p>wouldn’t be good if we couldn’t spawn more than a single thread on one of those supercomputers that are running out of those 48 bits for actual physical memory <span class="emoji emoji-1f642" title="slight smile">:slight_smile:</span></p>



<a name="154757954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/154757954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#154757954">(Jan 09 2019 at 21:10)</a>:</h4>
<p>I forked off a discussion about where the crate should live into <a href="#narrow/stream/131828-t-compiler/topic/rust-lang.20crates.20owned.20by.20t-compiler" title="#narrow/stream/131828-t-compiler/topic/rust-lang.20crates.20owned.20by.20t-compiler">the "rust-lang crates owned by compiler" topic</a></p>



<a name="156378345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/156378345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#156378345">(Jan 18 2019 at 15:56)</a>:</h4>
<p>One question: what do we do about the procedural macros? We cannot possibly tell people to "invoke this awesome function to make your stack problems go away", right?</p>



<a name="156378398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/156378398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#156378398">(Jan 18 2019 at 15:57)</a>:</h4>
<p>weren’t there an idea to run procedural macros in some sort of isolated environment or something, so that it does not crash compiler accidently etc?</p>



<a name="156378528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/156378528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#156378528">(Jan 18 2019 at 15:59)</a>:</h4>
<p>I guess it would be less of a problem with <code>stacker</code> being an independent thing... but then it would be ideal if procedural macro authors didn’t need to think about it at all</p>



<a name="156379950"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/156379950" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#156379950">(Jan 18 2019 at 16:18)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> <span class="user-mention" data-user-id="119009">@eddyb</span> did that work, I believe, but we wound up with the same process for perf reasons</p>



<a name="156380397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/156380397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#156380397">(Jan 18 2019 at 16:24)</a>:</h4>
<blockquote>
<p>wound up with the same process for perf reasons</p>
</blockquote>
<p>Not even same process, same <em>thread</em>.</p>



<a name="156380424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/156380424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#156380424">(Jan 18 2019 at 16:25)</a>:</h4>
<p>Right, so it would definitely benefit from at least having a fresh stack</p>



<a name="161060726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161060726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161060726">(Mar 18 2019 at 14:16)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> I don't remember, what are the next steps for <a href="https://github.com/rust-lang/rust/pull/55617" target="_blank" title="https://github.com/rust-lang/rust/pull/55617">https://github.com/rust-lang/rust/pull/55617</a> ? Are you still planning to implement basic windows support in <a href="https://github.com/alexcrichton/stacker/pull/13" target="_blank" title="https://github.com/alexcrichton/stacker/pull/13">https://github.com/alexcrichton/stacker/pull/13</a> ?</p>



<a name="161060770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161060770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161060770">(Mar 18 2019 at 14:17)</a>:</h4>
<p>Or should we preemptively start moving stacker and psm into one repo and then into the <code>rust-lang</code> org?</p>



<a name="161069632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161069632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161069632">(Mar 18 2019 at 15:51)</a>:</h4>
<p>The Windows support is there... technically the only thing that does not work is 32-bit windows which can be emulated by using fibers still</p>



<a name="161069656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161069656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161069656">(Mar 18 2019 at 15:51)</a>:</h4>
<p>The things to do are to figure out why the CI does not pass and merge everything together, move it into the T-compiler purview...</p>



<a name="161069746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161069746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161069746">(Mar 18 2019 at 15:52)</a>:</h4>
<p>I still am currently adapting to my new job, and dealing with finishing my involvement with the previous one</p>



<a name="161069756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161069756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161069756">(Mar 18 2019 at 15:53)</a>:</h4>
<p>so I don’t really have much time to dedicate to anything open source currently</p>



<a name="161069757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161069757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161069757">(Mar 18 2019 at 15:53)</a>:</h4>
<p>What are you using instead of fibers on x64 Windows?</p>



<a name="161069802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161069802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161069802">(Mar 18 2019 at 15:53)</a>:</h4>
<p><span class="user-mention" data-user-id="116466">@Zoxc</span> Nothing, the code just carefully preserves the SEH unwinding information, so it "just works".</p>



<a name="161069804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161069804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161069804">(Mar 18 2019 at 15:53)</a>:</h4>
<p>on 64-bit anyway.</p>



<a name="161069871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161069871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161069871">(Mar 18 2019 at 15:54)</a>:</h4>
<p>Are you just allocating a large stack? =P</p>



<a name="161069929"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161069929" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161069929">(Mar 18 2019 at 15:55)</a>:</h4>
<p>Oh, currently we are still allocating stack in chunks, like before. The windows code properly implements <code>rust_psm_on_stack</code> (which switches the stack to a new one) in a way that works on 64-bit windows.</p>



<a name="161070029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161070029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161070029">(Mar 18 2019 at 15:56)</a>:</h4>
<p>You can't switch stacks on Windows without fibers though</p>



<a name="161070100"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161070100" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161070100">(Mar 18 2019 at 15:57)</a>:</h4>
<p>You very much can, you just need to maintain the necessary information in TIB updated and correct.</p>



<a name="161070123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161070123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161070123">(Mar 18 2019 at 15:57)</a>:</h4>
<p>i.e. the regular <code>mov %rax, %rsp</code> is not enough.</p>



<a name="161070130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161070130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161070130">(Mar 18 2019 at 15:57)</a>:</h4>
<p>No, that doesn't work. I've tried. Leads to fun subtle bugs.</p>



<a name="161070227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161070227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161070227">(Mar 18 2019 at 15:58)</a>:</h4>
<p>What kinds of bugs have you encountered?</p>



<a name="161070247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161070247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161070247">(Mar 18 2019 at 15:58)</a>:</h4>
<p>Either way windows fiber code is not gone, so it is always possible to make stacker switch to either method</p>



<a name="161070295"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161070295" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161070295">(Mar 18 2019 at 15:59)</a>:</h4>
<p>I’m fine with the cost of fibers if that means we are sure that stuff works.</p>



<a name="161070316"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161070316" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161070316">(Mar 18 2019 at 15:59)</a>:</h4>
<p>but I’m fairly confident in my implementation of 64-bit stack switching -- it was made after reverse-engineering the fibers after all ;)</p>



<a name="161070416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161070416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161070416">(Mar 18 2019 at 16:00)</a>:</h4>
<p>Well it's possible I missed something, but MS can break it when they want to anyway.</p>



<a name="161070418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161070418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161070418">(Mar 18 2019 at 16:00)</a>:</h4>
<p><span class="user-mention" data-user-id="116466">@Zoxc</span> one interesting thing that I managed to make work is regular stack unwinding for backtraces -- it works fully and very well as well</p>



<a name="161070462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161070462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161070462">(Mar 18 2019 at 16:01)</a>:</h4>
<p>So instead of getting the backtrace for just the "current" stack you get the backtrace for the whole chain.</p>



<a name="161070472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161070472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161070472">(Mar 18 2019 at 16:01)</a>:</h4>
<p>I wonder how you managed that? MS added security checks which stops unwinding outside the current stack.</p>



<a name="161070501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161070501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161070501">(Mar 18 2019 at 16:01)</a>:</h4>
<p>Err, backtraces should work, actual SEH unwinding won't</p>



<a name="161070561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161070561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161070561">(Mar 18 2019 at 16:02)</a>:</h4>
<p>yeah, SEH won’t look past the current stack</p>



<a name="161070574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161070574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161070574">(Mar 18 2019 at 16:02)</a>:</h4>
<p>I still need to put a catch-all handler that restores the stack and reinvokes SEH unwinding...</p>



<a name="161070663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/161070663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#161070663">(Mar 18 2019 at 16:03)</a>:</h4>
<p>Ok, gotta run to walk doggo</p>



<a name="180741280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/180741280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#180741280">(Nov 14 2019 at 15:31)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> fwiw I fixed psm, should be good to just rebase the repo and update the dep for the PR</p>



<a name="190719016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190719016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190719016">(Mar 16 2020 at 13:07)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> do you remember why you split out parens in ast lowering (<a href="https://github.com/rust-lang/rust/pull/55617#discussion_r391689040" target="_blank" title="https://github.com/rust-lang/rust/pull/55617#discussion_r391689040">https://github.com/rust-lang/rust/pull/55617#discussion_r391689040</a>)?</p>



<a name="190719072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190719072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190719072">(Mar 16 2020 at 13:07)</a>:</h4>
<p>Also I would love to get somebody’s r+ otherwise I’m just gonna spend my time rebasing this admittedly nasty case of bitrot every day.</p>



<a name="190719292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190719292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190719292">(Mar 16 2020 at 13:09)</a>:</h4>
<p>It was split out because it does not work as a thing returning <code>ExprKind</code>, it needs to configure the <code>Expr</code> directly.</p>



<a name="190719306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190719306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190719306">(Mar 16 2020 at 13:09)</a>:</h4>
<p>I basically split it to keep the original code</p>



<a name="190719321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190719321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190719321">(Mar 16 2020 at 13:09)</a>:</h4>
<p>any refactorings there should happen outside the PR</p>



<a name="190719959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190719959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190719959">(Mar 16 2020 at 13:15)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> I guess <code>r=oli-obk,nagisa</code> after the next rebase? You're right in that we should land this soon, so it has a lot of time to bake. I also did another review pass, lgtm and impl wise let's address any further review-questions later.</p>



<a name="190729036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190729036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190729036">(Mar 16 2020 at 14:29)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="126931">@centril</span> ^</p>



<a name="190729596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190729596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190729596">(Mar 16 2020 at 14:32)</a>:</h4>
<p>ok as long as someone is available to answer why e.g. for loops were separated from the rest</p>



<a name="190729621"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190729621" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190729621">(Mar 16 2020 at 14:32)</a>:</h4>
<p>this needs comments in the code itself</p>



<a name="190729660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190729660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190729660">(Mar 16 2020 at 14:33)</a>:</h4>
<p>or we will get bus-factor=1</p>



<a name="190729735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190729735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190729735">(Mar 16 2020 at 14:33)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> so can you follow up with adding those comments to the code?</p>



<a name="190729749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190729749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190729749">(Mar 16 2020 at 14:33)</a>:</h4>
<p>this was already separated before my PR</p>



<a name="190729758"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190729758" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190729758">(Mar 16 2020 at 14:33)</a>:</h4>
<p>I don't know why</p>



<a name="190729850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190729850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190729850">(Mar 16 2020 at 14:34)</a>:</h4>
<p>it's not separated on master</p>



<a name="190729933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190729933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190729933">(Mar 16 2020 at 14:34)</a>:</h4>
<p>look at the diff, Parens is handled separately</p>



<a name="190729953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190729953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190729953">(Mar 16 2020 at 14:35)</a>:</h4>
<p>I just kept it like that</p>



<a name="190730057"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190730057" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190730057">(Mar 16 2020 at 14:35)</a>:</h4>
<p>oh you mean the early returns</p>



<a name="190730366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190730366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190730366">(Mar 16 2020 at 14:36)</a>:</h4>
<p>So we should be able to have <code>lower_expr_mut_inner</code> and include the parens and for loops in that, and then in <code>lower_expr_mut</code> we do the recursion thing</p>



<a name="190730421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190730421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190730421">(Mar 16 2020 at 14:37)</a>:</h4>
<p>yes we can do that, but not in this PR or maybe not ever, the current code works just fine</p>



<a name="190730588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190730588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190730588">(Mar 16 2020 at 14:38)</a>:</h4>
<p>if we can reasonably avoid <code>bug!(...)</code>s we should; and I need to follow up to remove the <code>rustc::middle</code> import at any rate</p>



<a name="190731262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190731262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190731262">(Mar 16 2020 at 14:43)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> so I had plans to move <code>rustc::middle::limits</code> into <code>rustc_passes</code>, but now lowering needs functionality added to that module... so I will need to either split that module apart or move it to rustc_session</p>



<a name="190731297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190731297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190731297">(Mar 16 2020 at 14:43)</a>:</h4>
<p>(I'm planning on removing lowering's dependency on the rustc crate)</p>



<a name="190731444"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190731444" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190731444">(Mar 16 2020 at 14:44)</a>:</h4>
<p>rustc_session is probably better for "make this functionality widely reachable", but I'm not a huge fan of moving code to that crate either</p>



<a name="190922694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190922694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190922694">(Mar 17 2020 at 23:08)</a>:</h4>
<p>I don’t particularly care where that helper ends up being, but it does need to be accessible by any code that does recursion. We can even duplicate the definition, if necessary. its not that large. Or error prone.</p>



<a name="190966232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190966232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190966232">(Mar 18 2020 at 11:17)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> that location would be rustc_data_structures then</p>



<a name="190966245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190966245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190966245">(Mar 18 2020 at 11:17)</a>:</h4>
<p>psm and stacker don't seem like they carry that much compile time burden</p>



<a name="190974754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190974754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190974754">(Mar 18 2020 at 12:49)</a>:</h4>
<p>yeah, those are fairly small, the largest dependency is probably <code>cc</code> which we already include everywhere else.</p>



<a name="190974891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190974891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190974891">(Mar 18 2020 at 12:50)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> any suggestions for the name of the new module in rustc_data_structures?</p>



<a name="190974947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190974947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190974947">(Mar 18 2020 at 12:51)</a>:</h4>
<p><code>rustc_data_structures::stack::ensure_sufficient</code> would make sense to me.</p>



<a name="190974981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190974981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190974981">(Mar 18 2020 at 12:51)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="190974983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190974983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190974983">(Mar 18 2020 at 12:51)</a>:</h4>
<p>especially because <code>stack</code> is a data structure of sorts if you squint hard enough :D</p>



<a name="190975032"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190975032" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190975032">(Mar 18 2020 at 12:51)</a>:</h4>
<p>I had the same module name in mind, so since we reached the same conclusion "it must be right" :P</p>



<a name="190975137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190975137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190975137">(Mar 18 2020 at 12:52)</a>:</h4>
<p>I’m planning to circle around and do some clean-ups on the weekends but you’re welcome to do them yourself if you want to get it done faster.</p>



<a name="190975195"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190975195" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190975195">(Mar 18 2020 at 12:53)</a>:</h4>
<p>I might get to it today if your PR has landed</p>



<a name="190975237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190975237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190975237">(Mar 18 2020 at 12:53)</a>:</h4>
<p>Although I had hoped <a href="https://github.com/rust-lang/rust/pull/69920" target="_blank" title="https://github.com/rust-lang/rust/pull/69920">https://github.com/rust-lang/rust/pull/69920</a> would have landed by now</p>



<a name="190975253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/stack%20growing/near/190975253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/stack.20growing.html#190975253">(Mar 18 2020 at 12:53)</a>:</h4>
<p>I can branch of that PR though =)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>